/*
 * @(#)ContactParty.java
 * Date 2013-08-15
 * Version 1.0
 * Author Jim Horner
 * Copyright (c)2012
 */


package us.hornerscorners.lamppost.model.patient;

import java.util.ArrayList;
import java.util.List;
import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;

import us.hornerscorners.lamppost.model.common.InstanceIdentifier;
import us.hornerscorners.lamppost.model.common.PhoneNumber;


/**
 *
 * @author jim
 *
 * TODO Add firstName, lastName, middleName, etc
 *
 * SeeAlso
 *  COCTMT150003UV03ContactParty
 *
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class ContactParty {

    /** Field description */
    private final List<InstanceIdentifier> identifiers;

    /** Field description */
    private final List<PersonName> personNames;

    /** Field description */
    private final List<PhoneNumber> phoneNumbers;

    /** Field description */
    private final List<PostalAddress> postalAddresses;

    /**
     * Constructs ...
     *
     */
    public ContactParty() {

        super();

        this.identifiers = new ArrayList<>();
        this.personNames = new ArrayList<>();
        this.phoneNumbers = new ArrayList<>();
        this.postalAddresses = new ArrayList<>();
    }

    /**
     * Method description
     *
     *
     * @return
     */
    @JsonIgnore
    public PersonName getFirstPersonName() {

        PersonName result = null;

        if (this.personNames.isEmpty() == false) {

            result = this.personNames.get(0);
        }

        return result;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public List<InstanceIdentifier> getIdentifiers() {
        return identifiers;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public List<PersonName> getPersonNames() {
        return personNames;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public List<PhoneNumber> getPhoneNumbers() {
        return phoneNumbers;
    }

    /**
     * Method description
     *
     *
     * @return
     */
    public List<PostalAddress> getPostalAddresses() {
        return postalAddresses;
    }
}
